//Component Object

Component({
  data: {
    a:0
  },
  attached: function(){
    console.log('attached a:',this.data.a)
    this.setData({
      a:1
    },()=>{
      console.log('attached a2:',this.data.a)
    })
  },
  ready: function(){
    console.log('ready a:',this.data.a)
  }
});